package com.wallpaper.setting.launcher.activity;

import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.wallpaper.setting.launcher.R;
import com.wallpaper.setting.launcher.menu.CircleLayout;
import com.wallpaper.setting.launcher.util.AppUtil;

public class MainActivity extends BaseActivity {

	private RelativeLayout mWallpaperBg ;
	
	private CircleLayout mCircleLayout ;
	
	private Bitmap mBitmap ;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_activity);
		mWallpaperBg = (RelativeLayout) findViewById(R.id.wallpaper_bg);
		mCircleLayout = (CircleLayout) findViewById(R.id.main_circle_layout);
		Drawable background = AppUtil.getInstance().getWallpaper(this);
		if (AppUtil.getInstance().getVersionCode() >= 16) {
			try {
				mWallpaperBg.setBackground(background);
			} catch (Exception e) {
				mWallpaperBg.setBackgroundDrawable(background);
			}
		} else {
			mWallpaperBg.setBackgroundDrawable(background);
		}
	}
}
